package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 公告面板，发布通知
 * </p>
 *
 * @author hyb
 * @since 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Announcement implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 公告id
     */
    @TableId(value = "announcement_id", type = IdType.AUTO)
    private Integer announcementId;

    /**
     * 公告标题
     */
    private String title;

    /**
     * 公告的内容
     */
    private String text;

    /**
     * 公告分类
     */
    private String classification;

    /**
     * 公告的创建者id
     */
    private Integer creatorId;

    /**
     * 0 不显示，1显示
     */
    private Integer isActive;

    /**
     * 记录最后更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;
    public Announcement(Integer id, String title,String text,String classification) {
        this.announcementId = id;
        this.title = title;
        this.text = text;
        this.classification = classification;
        this.isActive=1;
        this.createTime = LocalDateTime.now();
        this.updateTime = LocalDateTime.now();
    }



}
